import { ListPage } from "custom/index";
// import { getEmployeeManagement, exportEmployeeManagement } from '../api'
// import { onDutyStatusOptions, becomeRegularStatusOptions } from '../constant'
// import RoomNameJsonColumn from './components/RoomNameJsonColumn.vue'
// import { removeItem, addRecord, viewRecord }  from './action'

const page = new ListPage('CustomerManagement');

page
  // .api()
  .useSearch()
    .addInputItem('keyword', '员工姓名/花名/工号/手机号') 
    .addItem({ prop: 'name', label: '员工姓名' })
    .addItem({ prop: 'flowerName', label: '花名' })
    .addItem({ prop: 'no', label: '工号' })
    .addItem({ prop: 'mobile', label: '手机号' })
    .addItem({ prop: 'deptNo', label: '部门' })
    .end()
  .useTable()
    .addIndexColumn()
    .useColumn('name').label('员工姓名').end()
    .addColumn({ prop: 'flowerName', label: '花名'})
    .addColumn({ prop: 'sex', label: '性别'})
    .addColumn({ prop: 'mobile', label: '手机号码', minWidth: 120})
    .addColumn({ prop: 'no', label: '工号'})
    .addColumn({ prop: 'companyName', label: '公司'})
    .addColumn({ prop: 'deptName', label: '部门'})
    .addColumn({ prop: 'pestName', label: '岗位'})
    .addColumn({ prop: 'entryDate', label: '入职日期', minWidth: 110})
    // .addEnumColumn({ prop: 'onDutyStatus', label: '在职状态 '}, onDutyStatusOptions)
    // .addEnumColumn({ prop: 'becomeRegularStatus', label: '转正状态'}, becomeRegularStatusOptions)
    .addColumn({ prop: 'becomeRegulardDate', label: '转正时间'})
    .addColumn({ prop: 'sendDepartMsg', label: '离职短信 '})
    .end()
  .addPagination()
  .useAuthButton()
    // .useItem('add').content('新增').primary().to('EmployeeManagementAdd').end()
    // .useItem('export').content('导出数据').exportData(exportEmployeeManagement).end()
    .end()
  .useAuthColumn({ width: 110 })
    // .useItem('export').content('编辑').toDetail('EmployeeManagementEdit', row => ({ params: { id: row.userId } })).end()
    // .useItem('delete').content('删除').end()

export default page
